package com.example.yuejian.service;


import com.example.yuejian.Bean.Attention;
import com.example.yuejian.Bean.Club;
import com.example.yuejian.Bean.Course;
import com.example.yuejian.Bean.Information;
import com.example.yuejian.Bean.OrderBean;
import com.example.yuejian.Bean.Post;
import com.example.yuejian.Bean.PostComment;
import com.example.yuejian.Bean.Success;

import okhttp3.MultipartBody;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;


public interface YuejianService {
    @GET("Club/clublist/") //俱乐部列表
    Call<Club>clublist(


    );

    @GET("UserInformation/userInf/") //获取用户信息
    Call<Information>userInf(
            @Query("suer_id") int suer_id
    );
    @GET("Post/postlist/") //帖子列表
    Call<Post>postlist(
    );

    @GET("Comment/thiscommentList/") //帖子评论
    Call<PostComment>thiscommentList(
            @Query("userid") int userid,
            @Query("postid") int postid,
            @Query("flag") int flag
    );

    @GET("Order/orderlist/") //订单列表
    Call<OrderBean>orderlist(
            @Query("userid") int userid

    );
    @GET(" Club/clubCourse/") //俱乐部课程列表
    Call<Course>clubCourse(
            @Query("club_id") int club_id
    );



    @GET("Post/addComment/") //添加评论
    Call<Success>addComment(
            @Query("post_id") int post_id,
            @Query("userid") int userid,
            @Query("com_id") int com_id,
            @Query("content") String content
    );

    @GET("Post/postlist/") //用户帖子列表
    Call<Post>userpostlist(
            @Query("userid") int userid,
            @Query("flag") int flag,
            @Query("page") int page
    );

    @GET("Attention/attentionlist/") //关注
    Call<Attention>attentionlist(
            @Query("suer_id") int suer_id,
            @Query("flag") int flag
    );

    @Multipart
    @POST("Post/postadd/") //发帖子
    Call<Success>postadd(
            @Query("uid") int userid,
            @Query("content") String content,
            @Part MultipartBody.Part file
    );


    @Multipart
    @POST("UserInformation/alteruser/") //个人详情修改
    Call<Success>alteruser(
            @Query("uid") int userid,
            @Query("name") String name,
            @Query("address") String address
    );

}

